﻿using System.Configuration;
using static ZK.Common.BasicSetup;
using static ZK.Common.HardWareConfig;

namespace ZK.Common
{
    public class MyCustomConfig
    {
        public static MyLedSmallEnterElement ledSmallEnterConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).LedSmallEnter; }
        }
       
        public static CameraScalesQElement cameraScalesQ
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).cameraScalesQ; }
        }

        public static CameraScalesGElement cameraScalesG
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).cameraScalesG; }
        }
        public static CameraScalesHElement cameraScalesH
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).cameraScalesH; }
        }
        public static MyLedSmallOutElement ledSmallOutConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).LedSmallOut; }
        }
        //public static readonly MyLedBigElement ledBigConfig = hardWare.LedBig;
        public static MyCameraEnterElement cameraEnterConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).CameraEnter; }
        }
        public static MyCameraOutElement cameraOutConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).CameraOut; }
        }
        public static MyCameraMonitorElement cameraMonitorConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).CameraMonitor; }
        }
        public static MyReaderEnterElement readerEnterConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).ReaderEnter; }
        }
        public static MyReaderOutElement readerOutConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).ReaderOut; }
        }
        /// <summary>
        /// 地磅配置节点
        /// </summary>
        public static MyWagonBalanceElement wagonBalanceConfig
        {
            get{ return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).WagonBalance; }
        }
        public static MyTrafficLightElement trafficLightConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).TrafficLight; }
        }
        public static MyInfraredElement InfraredConfig
        {
            get { return ((HardWareConfig)ConfigurationManager.GetSection("HardWareConfig")).Infrared; }
        }
        
        //public static MySysSetupElement sysSetup
        //{
        //    get { return ((BasicSetup)ConfigurationManager.GetSection("BasicSetup")).SysSetup; }
        //}
        public static MyCustomerInfoElement customerInfo
        {
            get { return ((BasicSetup)ConfigurationManager.GetSection("BasicSetup")).CustomerInfo; }
        }
        public static MyUserInfoElement userInfo
        {
            get { return ((BasicSetup)ConfigurationManager.GetSection("BasicSetup")).UserInfo; }
        }
        public static MyWeightScaleElement weightScale
        {
            get { return ((BasicSetup)ConfigurationManager.GetSection("BasicSetup")).WeightScale; }
        }
        public static MyBunkerInfoElement bunkerInfo
        {
            get { return ((BasicSetup)ConfigurationManager.GetSection("BasicSetup")).BunkerInfo; }
        }
        public static int readerTimeOut = Settings.GetInt("UnRepeatTime");
        public static string AccessFormConfig = Settings.GetAppConfig("AccessRange");

    }

   

   
}
